home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / programming / gui / bgui11b.lha / docs / labelclass.doc < prev    next >
Encoding:
Text File  |  1994-07-05  |  6.7 KB  |  197 lines

  1.  
  2.            $RCSfile: labelclass.doc,v $
  3.         Description: Labelclass documentation.
  4.           Copyright: (C) Copyright 1994 Jaba Development.
  5.                      (C) Copyright 1994 Jan van den Baard.
  6.                      All Rights Reserved.
  7.  
  8.             $Author: jaba $
  9.           $Revision: 1.1 $
  10.               $Date: 1994/07/04 21:05:30 $
  11. ------------------------------------------------------------------------------
  12.  
  13. TABLE OF CONTENTS
  14.  
  15. labelclass/--background--
  16. labelclass/Methods
  17. labelclass/Attributes
  18.  
  19. labelclass/--background--                            labelclass/--background--
  20.  
  21.     NAME
  22.         Class:          labelclass
  23.         Superclass:     IMAGECLASS
  24.         Include File:   <libraries/bgui.h>
  25.  
  26.     FUNCTION
  27.         To  provide  a  general  labeling  image. It supports underscoring and
  28.         placement  of  the label simular to the gadtools gadget labels. It has
  29.         been  constructed  in  a way to make multi-line labels possible in the
  30.         future in a compatible way
  31.  
  32. labelclass/Methods                                          labelclass/Methods
  33.  
  34.     NEW METHODS
  35.         IM_EXTENT -- This  method  will ask a labelclass object for the amount
  36.                 of pixels the label extends the image bounding box.   Normally
  37.                 this method is only used by the baseclass which handles labels
  38.                 but in some cases you might need this method for yourself. The
  39.                 method uses the following custom message structure:
  40.  
  41.                 struct impExtent {
  42.                         ULONG            MethodID;      /* IM_EXTENT */
  43.                         struct RastPort *impe_RPort;
  44.                         struct IBox     *impe_Extent;
  45.                         struct {
  46.                                 UWORD   *Width;
  47.                                 UWORD   *Height;
  48.                         }                impe_LabelSize;
  49.                         UWORD            impe_Flags;
  50.                 };
  51.  
  52.                 impe_RPort -- This  must  point  to  the RastPort in which the
  53.                         label is to be rendered.  It  is copied to an internal
  54.                         buffer and on that  copy font changes and calculations
  55.                         will  be  made  so the  RastPort you pass here remains
  56.                         unchanged. This must be valid.
  57.  
  58.                 impe_Extent -- This   field   is   used  to  store  the  label
  59.                         extentions. The label extentions are simply the number
  60.                         of pixels  which  the label extends the image bounding
  61.                         box in either direction.  The Left and Top fields will
  62.                         always be smaller than or equal to zero. The Width and
  63.                         Height  fields  will always be equal to or bigger than
  64.                         zero. This must be valid.
  65.  
  66.                 impe_LabelSize -- In  this  field  the  total  pixel width and
  67.                         height of the label is stored. This must be valid.
  68.  
  69.                 impe_Flags -- This  field  may  contain  any of  the following
  70.                         flags:
  71.  
  72.                         EXTF_MAXIMUM -- Normally  when  this  method is called
  73.                                 the returned values are the extentions as they
  74.                                 are at the moment you call this method.   When
  75.                                 this flag is set the returned  values  are the
  76.                                 maximum  possible  extentions  the  label  can
  77.                                 have.
  78.  
  79.     CHANGED METHODS
  80.         None.
  81.  
  82.     SEE ALSO
  83.         baseclass.doc
  84.  
  85. labelclass/Attributes                                    labelclass/Attributes
  86.  
  87.     NAME
  88.         LAB_TextAttr -- ( struct TextAttr * )
  89.  
  90.     FUNCTION
  91.         Set  or  get  the  font that is to be used to render the label. Please
  92.         note  that the font you pass here is opened with OpenFont() so it must
  93.         be in memory already.
  94.  
  95.         Default is NULL. Applicability is (ISG).
  96.  
  97.     NAME
  98.         LAB_Style -- ( UWORD )
  99.  
  100.     FUNCTION
  101.         Set or get  the style as defined in <graphics/text.h> which is used to
  102.         render the font. Note that this style overrides the style of  the font
  103.         passed by the LAB_TextAttr attribute.
  104.  
  105.         Default is FS_NORMAL. Applicability is (ISG).
  106.  
  107.     SEE ALSO
  108.         LAB_TextAttr, <graphics/text.h>
  109.  
  110.     NAME
  111.         LAB_Underscore -- ( UBYTE )
  112.  
  113.     FUNCTION
  114.         Set or get  the  character that marks the character to be underscored.
  115.         Normally the underscored character is used to mark a key  which can be
  116.         used to control the gadget. Example:
  117.  
  118.                 LAB_Underscore, '@'
  119.  
  120.                 Will underscore the 'O' character in the following label:
  121.  
  122.                 "@Open"
  123.  
  124.         Default is 0. Applicability is (ISG).
  125.  
  126.     NAME
  127.         LAB_Place -- ( ULONG )
  128.  
  129.     FUNCTION
  130.         Set or get the place relative to the  image  bounding box at which the
  131.         label is rendered. The following places are possible:
  132.  
  133.                 PLACE_IN -- The label is cenetered inside the image bounds.
  134.  
  135.                 PLACE_LEFT -- The label is placed left of the image bounds and
  136.                         cenetered vertically.
  137.  
  138.                 PLACE_RIGHT -- The label is placed  right of the  image bounds
  139.                         and cenetered vertically.
  140.  
  141.                 PLACE_ABOVE -- The label is placed above the image  bounds and
  142.                         centered horizontally.
  143.  
  144.                 PLACE_BELOW -- The label is placed below the image  bounds and
  145.                         centered horizontally.
  146.  
  147.         Default is PLACE_IN. Applicability is (ISG).
  148.  
  149.     NAME
  150.         LAB_Label -- ( STRPTR )
  151.  
  152.     FUNCTION
  153.         Set or get the actual text for the label.
  154.  
  155.         Default is NULL. Applicabillity is (ISG).
  156.  
  157.     NAME
  158.         LAB_Flags -- ( ULONG )
  159.  
  160.     FUNCTION
  161.         Set or get  the flag settings of the label.   The  following flags are
  162.         possible:
  163.  
  164.                 LABF_HIGHLIGHT --  Normally  the  label  is  rendered  in  the
  165.                         TEXTPEN or FILLTEXTPEN color.  When this  flag  is set
  166.                         the label is rendered in the HIGHLIGHTTEXTPEN color.
  167.  
  168.                 LABF_HIGH_USCORE -- This is the  same  as  LABF_HIGHLIGHT only
  169.                         now the color of the underscoring is affected.
  170.  
  171.         Default is 0. Applicability is (ISG).
  172.  
  173.     SEE ALSO
  174.         LAB_Highlight, LAB_HighUScore, <intuition/screens.h>
  175.  
  176.     NAME
  177.         LAB_Highlight -- ( BOOL )
  178.  
  179.     FUNCTION
  180.         Set or clear the LABF_HIGHLIGHT flag.
  181.  
  182.         Default is FALSE. Applicability is (ISG).
  183.  
  184.     SEE ALSO
  185.         LAB_Flags
  186.  
  187.     NAME
  188.         LAB_HighUScore -- ( BOOL )
  189.  
  190.     FUNCTION
  191.         Set or clear the LABF_HIGH_USCORE flags.
  192.  
  193.         Default is FALSE. Applicability is (ISG).
  194.  
  195.     SEE ALSO
  196.         LAB_Flags
  197.